﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace week12
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.textBox1.Text = this.dateTimePicker2.Value.ToString();
           // this.textBox1.Text = this.dateTimePicker2.Text;
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void groupBox1_Enter(object sender, EventArgs e)
        {

        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void Form2_Load(object sender, EventArgs e)
        {

        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            this.dateTimePicker2.Format = DateTimePickerFormat.Long;
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            this.dateTimePicker2.Format = DateTimePickerFormat.Short;
        }

        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            this.dateTimePicker2.Format = DateTimePickerFormat.Time;
        }

        private void radioButton4_CheckedChanged(object sender, EventArgs e)
        {
            this.dateTimePicker2.Format = DateTimePickerFormat.Custom;
            this.dateTimePicker2.CustomFormat = textBox2.Text;
        }
    }
}
